import isNumber from "is-number";
import {
  AGConnectCloudDB,
  CloudDBZoneQuery,
  CloudDBZoneConfig
} from '@agconnect/database';
import agconnect from '@agconnect/api';
import { agConnectConfig } from '../config/agConnectConfig';


let isOpenCloudDB = false;
let cloudDB;
Page({
  onLoad: () => {
    console.log('isNumber(1) = ', isNumber(1));
    initConfig();
  },
  
});
function initConfig() {
  if (!isOpenCloudDB) {
    agconnect.instance().configInstance(agConnectConfig);
    AGConnectCloudDB.initialize(agConnectConfig);
    cloudDB = AGConnectCloudDB.getInstance();
    // cloudDB.createObjectType(schema);
    isOpenCloudDB = true;
    console.log('init success');
  }
}